import {
    getEquipmentAll,
    getEquipmentArr,
    updataEquipmentById,
    deleteEquipmentById,
    deleteEquipmentMoreById,
    SearchEquipmentKey,
    addEquipment,
  } from "../../api/equipment.js";
  import { verifyToken } from "../../utils/TokenCheck.js";
  
  export default function equipmentRouter(router) {
    // 获取全部设备信息
    router.get("/getEquipmentAll", verifyToken, getEquipmentAll);
    // 分页查询设备信息
    router.post("/getEquipmentPage", verifyToken, getEquipmentArr);
    // 修改指定id设备信息
    router.post("/updataEquipmentById", verifyToken, updataEquipmentById);
    // 删除指定id设备信息
    router.delete("/deleteEquipmentById/:id", verifyToken, deleteEquipmentById);
    // 批量删除指定id设备信息
    router.post("/deleteEquipmentMoreById", verifyToken, deleteEquipmentMoreById);
    // 根据key-value分页查询指定设备信息
    router.post("/SearchEquipmentKey", verifyToken, SearchEquipmentKey);
    // 添加设备信息
    router.post("/addEquipment", verifyToken, addEquipment);
  }
  